get nonzero min numpy

35

import numpy as np
minval = np.min(a[np.nonzero(a)])
maxval = np.max(a[np.nonzero(a)])

Comments

Submit
0 Comments